package com.zb.vo;

import com.zb.annotation.NumberPattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/9/21 0021
 **/
@Data
@ApiModel("工单商品类型对象")
public class OrderGoodsTypeVo {
    @NotNull(message = "工单编码商品类型不能为空")
    @NumberPattern(regexp = "^(1|2|3)$", message = "工单编码商品类型参数不合法")
    @ApiModelProperty(value = "工单编码商品类型：1-客户已登记商品，2-未登记商品，3-商品信息", required = true, example = "1")
    private Integer type;

    @Valid
    @NotNull(message = "工单商品不能为空")
    @Size(min = 1, message = "工单商品至少填写一项")
    @ApiModelProperty(value = "工单商品对象")
    private List<OrderGoodsVo> orderGoodsVos;
}
